<?php
  echo $this->Html->css('calendar/fullcalendar');
?>

<div id="content">
	<!--  start page-heading -->
	<div id="page-heading">
		<h1><?php echo __('Events');?></h1>
    <?php //echo $this->Html->link("Ticket", array('action' => 'add')); ?>&nbsp;&nbsp;
	</div>
	<!-- end page-heading -->
	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
  	<tr>
  		<th rowspan="3" class="sized">
          <?php echo $this->Html->image('/images/shared/side_shadowleft.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
      </th>
  		<th class="topleft"></th>
  		<td id="tbl-border-top">&nbsp;</td>
  		<th class="topright"></th>
  		<th rowspan="3" class="sized">
          <?php echo $this->Html->image('/images/shared/side_shadowright.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
      </th>
  	</tr>
  	<tr>
  		<td id="tbl-border-left"></td>
  		<td>
  		<!--  start content-table-inner ...................................................................... START -->
    		<div id="content-table-inner">
      			<!--  start table-content  -->
      			<div id="table-content">

              <div class="events view">
              <h2><?php echo __('Event'); ?></h2>
              	<dl><?php $i = 0; $class = ' class="altrow"';?>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Event Type'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php echo $this->Html->link($event['EventType']['name'], array('controller' => 'event_types', 'action' => 'view', $event['EventType']['id'])); ?></dd>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Title'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php echo $event['Event']['title']; ?></dd>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Details'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php echo $event['Event']['details']; ?></dd>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Status'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php echo $event['Event']['status']; ?></dd>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Start'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php echo $event['Event']['start']; ?></dd>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('End'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php if($event['Event']['all_day'] != 1) { echo $event['Event']['end']; } else { echo "N/A"; } ?></dd>
                              <dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('All Day'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php if($event['Event']['all_day'] == 1) { echo "Yes"; } else { echo "No"; } ?></dd>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Created'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php echo $event['Event']['created']; ?></dd>
              		<dt<?php if ($i % 2 == 0) echo $class;?>><?php echo __('Modified'); ?></dt>
              		<dd<?php if ($i++ % 2 == 0) echo $class;?>><?php echo $event['Event']['modified']; ?></dd>
              	</dl>
              </div>
              <div class="actions">
              	<ul>
              		<li><?php echo $this->Html->link(__('Edit Event', true), array('action' => 'edit', $event['Event']['id'])); ?> </li>
              		<li><?php echo $this->Html->link(__('Delete Event', true), array('action' => 'delete', $event['Event']['id']), null, sprintf(__('Are you sure you want to delete this %s event?', true), $event['EventType']['name'])); ?> </li>
              		<li><?php echo $this->Html->link(__('Manage Events', true), array('action' => 'index')); ?> </li>
              		<li><li><?php echo $this->Html->link(__('View Calendar', true), array('controller' => 'calendars', 'action' => 'index')); ?></li>
              	</ul>
              </div>
        		</div>
      <!--  end content-table  -->
    		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>
